******************************************************
**                                                  **
**  Project Author: Francisco Pedraza & Joe Ura     **
**  Title: Latinos' Knowledge of the Supreme Court  **
**  		for the US Supreme Court                **
**                                                  **
**  Replication File for JLC                        **
**                                                  **
******************************************************

***************************************************
**                                               **
** Project description:                          **
** We compare Latino and White knowledge and     **
** of the US Supreme court.                      **
**                                               **
** This do file appends pre and post-decision    **
** data for end-user analysis.                   **
**                                               **
** Requires spost package                        **
***************************************************

clear
use "pu jlc replication.dta", clear
svyset _n [pw=wt]

*Figure 1
*2012 percentages
*Previous years' percentages from Gibson and Caldeira (2009) CCC

svy: tab scappoint if post==0 
svy: tab scappoint if post==1 

svy: tab sclife if post==0 
svy: tab sclife if post==1 

svy: tab sclastsay if post==0 
tab sclastsay if post==1 

*Figure 2

svy: tab scknowledge if latino==1 & post==0 
svy: tab scknowledge if latino==1 & post==1 

svy: tab scknowledge if latino==0 & post==0 
svy: tab scknowledge if latino==0 & post==1

*Figure 3

*May-June 
svy: tab scappoint if latino==1 & post==0 
svy: tab scappoint if latino==0 & post==0 

svy: tab sclife if latino==1 & post==0 
svy: tab sclife if latino==0 & post==0 

svy: tab sclastsay if latino==1 & post==0 
svy: tab sclastsay if latino==0 & post==0 

svy: tab scknowledge if latino==1 & post==0 
svy: tab scknowledge if latino==0 & post==0 

*July

svy: tab scappoint if latino==1 & post==1 
svy: tab scappoint if latino==0 & post==1 

svy: tab sclife if latino==1 & post==1 
svy: tab sclife if latino==0 & post==1

svy: tab sclastsay if latino==1 & post==1 
svy: tab sclastsay if latino==0 & post==1 

svy: tab scknowledge if latino==1 & post==1 
svy: tab scknowledge if latino==0 & post==1 

*Figure 4
*Model estimates

svy: poisson scknowledge latino edsomecoll edcoll post  latinoXedsomecoll latinoXedcoll edsomecollXpost edcollXpost latinoXpost  edsomecollXlatinoXpost edcollXlatinoXpost female

*Predicted values
*Requires spost package

*First panel
*May-June

prvalue, x(latino=1 edsomecoll=0 edcoll=0 post=0 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=1 edsomecoll=1 edcoll=0 post=0 latinoXedsomecoll=1 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=1 edsomecoll=0 edcoll=1 post=0 latinoXedsomecoll=0 latinoXedcoll=1 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=0 edsomecoll=0 edcoll=0 post=0 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=0 edsomecoll=1 edcoll=0 post=0 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=0 edsomecoll=0 edcoll=1 post=0 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

*Second panel
*July

prvalue, x(latino=1 edsomecoll=0 edcoll=0 post=1 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=1 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=1 edsomecoll=1 edcoll=0 post=1 latinoXedsomecoll=1 latinoXedcoll=0 edsomecollXpost=1 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=1 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=1 edsomecoll=0 edcoll=1 post=0 latinoXedsomecoll=0 latinoXedcoll=1 edsomecollXpost=0 edcollXpost=1 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=1 female=0)

prvalue, x(latino=0 edsomecoll=0 edcoll=0 post=1 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=0 edsomecoll=1 edcoll=0 post=1 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=1 edcollXpost=0 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

prvalue, x(latino=0 edsomecoll=0 edcoll=1 post=1 latinoXedsomecoll=0 latinoXedcoll=0 edsomecollXpost=0 edcollXpost=1 latinoXpost=0 edsomecollXlatinoXpost=0 edcollXlatinoXpost=0 female=0)

*Descriptive distribution of knowledge results 
*For a figure for previous iteration of the manuscript

* may-june

svy: tab scknowledge if latino==1 & post==0 & edcoll==0 & edsomecoll==0
svy: tab scknowledge if latino==0 & post==0 & edcoll==0 & edsomecoll==0 

svy: tab scknowledge if latino==1 & post==0 & edcoll==0 & edsomecoll==1 
svy: tab scknowledge if latino==0 & post==0 & edcoll==0 & edsomecoll==1 

svy: tab scknowledge if latino==1 & post==0 & edcoll==1 & edsomecoll==0 
svy: tab scknowledge if latino==0 & post==0 & edcoll==1 & edsomecoll==0 

svy: tab scknowledge if latino==1 & post==0 
svy: tab scknowledge if latino==0 & post==0 

* july

svy: tab scknowledge if latino==1 & post==1 & edcoll==0 & edsomecoll==0 
svy: tab scknowledge if latino==0 & post==1 & edcoll==0 & edsomecoll==0 

svy: tab scknowledge if latino==1 & post==1 & edcoll==0 & edsomecoll==1 
svy: tab scknowledge if latino==0 & post==1 & edcoll==0 & edsomecoll==1 

svy: tab scknowledge if latino==1 & post==1 & edcoll==1 & edsomecoll==0 
svy: tab scknowledge if latino==0 & post==1 & edcoll==1 & edsomecoll==0 

svy: tab scknowledge if latino==1 & post==1 
svy: tab scknowledge if latino==0 & post==1 

*Figure 5
*Model estimates
*Analysis for Latinos only; no weighting for Latino over-sample.

poisson scknowledge edsomecoll edcoll post edsomecollXpost edcollXpost usborn engint cuba prico other female usbornXpost engintXpost cubaXpost pricoXpost otherXpost if latino==1

*Predicted values
*Requires spost package

*First panel

prvalue, x(edsomecoll=0 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=0 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=0 post=1 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=1 edsomecollXpost=1 edcollXpost=0 usborn=0 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=1 edsomecollXpost=0 edcollXpost=1 usborn=0 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

*Second panel

prvalue, x(edsomecoll=0 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=0 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=0 post=1 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=1 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=1 edsomecollXpost=1 edcollXpost=0 usborn=1 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=1 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=1 edsomecollXpost=0 edcollXpost=1 usborn=1 engint=0 cuba=0 prico=0 other=0 female=0 usbornXpost=1 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

*Third panel

prvalue, x(edsomecoll=0 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=0 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=0 post=1 edsomecollXpost=0 edcollXpost=0 usborn=0 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=1 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=1 edsomecollXpost=1 edcollXpost=0 usborn=0 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=1 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=1 edsomecollXpost=0 edcollXpost=1 usborn=0 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=1 cubaXpost=0 pricoXpost=0 otherXpost=0)

*Final panel

prvalue, x(edsomecoll=0 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=0 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=0 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=0 engintXpost=0 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=0 post=1 edsomecollXpost=0 edcollXpost=0 usborn=1 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=1 engintXpost=1 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=1 edcoll=0 post=1 edsomecollXpost=1 edcollXpost=0 usborn=1 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=1 engintXpost=1 cubaXpost=0 pricoXpost=0 otherXpost=0)

prvalue, x(edsomecoll=0 edcoll=1 post=1 edsomecollXpost=0 edcollXpost=1 usborn=1 engint=1 cuba=0 prico=0 other=0 female=0 usbornXpost=1 engintXpost=1 cubaXpost=0 pricoXpost=0 otherXpost=0)

*Descriptive distribution of knowledge results 
*For a figure for previous iteration of the manuscript

* nativity
tab scknowledge if latino==1 & post==0 & usborn==1 
tab scknowledge if latino==1 & post==1 & usborn==1 
tab scknowledge if latino==1 & post==0 & usborn==0 
tab scknowledge if latino==1 & post==1 & usborn==0 

* english interview
tab scknowledge if latino==1 & post==0 & engint==1 
tab scknowledge if latino==1 & post==1 & engint==1 
tab scknowledge if latino==1 & post==0 & engint==0 
tab scknowledge if latino==1 & post==1 & engint==0 

* national origin
tab scknowledge if latino==1 & post==0 & cuba==1 & prico==0 & other==0 
tab scknowledge if latino==1 & post==1 & cuba==1 & prico==0 & other==0 
tab scknowledge if latino==1 & post==0 & cuba==0 & prico==1 & other==0 
tab scknowledge if latino==1 & post==1 & cuba==0 & prico==1 & other==0 
tab scknowledge if latino==1 & post==0 & cuba==0 & prico==0 & other==1
tab scknowledge if latino==1 & post==1 & cuba==0 & prico==0 & other==1
tab scknowledge if latino==1 & post==0 & cuba==0 & prico==0 & other==0
tab scknowledge if latino==1 & post==1 & cuba==0 & prico==0 & other==0

* gender
tab scknowledge if latino==1 & post==0 & female==1 
tab scknowledge if latino==1 & post==1 & female==1 
tab scknowledge if latino==1 & post==0 & female==0 
tab scknowledge if latino==1 & post==1 & female==0 
